package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.sys.modular.system.entity.*;
import cn.stylefeng.guns.sys.modular.system.model.params.ProDataViewParam;
import cn.stylefeng.guns.sys.modular.system.model.params.ProjectParam;
import cn.stylefeng.guns.sys.modular.system.model.result.DataResult;
import cn.stylefeng.guns.sys.modular.system.model.result.ProjectJdResult;
import cn.stylefeng.guns.sys.modular.system.model.result.ProjectResult;
import cn.stylefeng.guns.sys.modular.system.model.result.ProjectYaomaResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jiangge
 * @since 2020-09-10
 */
public interface ProjectMapper extends BaseMapper<Project> {

    /**
     * 获取列表
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    List<ProjectResult> customList(@Param("paramCondition") ProjectParam paramCondition);

    /**
     * 查存（店名）
     *
     */
    Integer selectDm(@Param("name") String name);

    /**
     * 获取map列表
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ProjectParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    Page<ProjectResult> customPageList(@Param("page") Page page, @Param("paramCondition") ProjectParam paramCondition);
    Page<ProjectResult> customPageListAdmin(@Param("page") Page page, @Param("paramCondition") ProjectParam paramCondition);


    /**
     * 获取开业查询列表
     *
     * @author stylefeng
     * @Date 2019-06-20
     */
    Page<ProjectResult> listKY(@Param("page") Page page, @Param("pro") Project pro);

    /**
     * 获取分页map列表
     *
     * @author jiangge
     * @Date 2020-09-10
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ProjectParam paramCondition);

    int updateProjectByCondition(ProjectParam record);

    Project selectDd(Integer proid);

    /**
     * 查询督导列表
     *
     * @return
     */
//    List<Map> selectDdList(String name);
    List<Map> selectDdList(String phone);

    /**
     * 查询营运经理列表
     *
     * @return
     */
    List<Map> selectYyjlList();

    /**
     * 查询营表格列表内容
     *
     * @return
     */
    List<MouldBoardMsg> selectMsgList(@Param("proId") Integer proId, @Param("mouldId") Integer mouldId);

    String selectName(String phone);

    Page<ProjectResult> getAllProPage(@Param("page") Page pageContext, @Param("param") ProjectParam param);

    Page<ProjectResult> yingYunQuery(@Param("page") Page pageContext, @Param("param") ProjectParam param);

    /**
     * 查询该工程是否已完工
     *
     * @param proId
     * @return
     */
    Integer getStatus(Integer proId);

    Integer getTask();

    /**
     * 查询该工程开发人员openid
     * @param proId
     * @return
     */
    Map selectKf(Integer proId);

    Project selectProject(Integer proId);

    /**
     * 批量隐藏接口
     * @param id
     * @param status
     * @return
     */
    int editBatch(@Param("id") String id, @Param("status") Integer status);

    ProjectResult selectOneByParam(@Param("param") ProjectParam projectParam);


    List<Map<String, Object>> customMapMdzxList(@Param("paramCondition") ProjectParam paramCondition);

    //查询工程状态
    Map getSta(Integer proId);

    //查询店名
    int getName(@Param("name") String name);

    Page<ProjectResult> projectList(@Param("page") Page pageContext,@Param("param") ProjectParam projectParam);

    Page<ProjectJdResult> jindu(@Param("page") Page page,@Param("param")ProjectParam param);

    Page<ProjectJdResult> cokeReportList(@Param("page") Page page,@Param("param")ProjectParam param);

    List<ProjectJdResult> jindu(@Param("param")ProjectParam param);

    List<Area> getAreaByType();

    /**
     * 收银系统报表
     * @param page
     * @param param
     * @return
     */
    IPage<ProjectJdResult> sYList(@Param("page") Page page, @Param("param") ProjectParam param);

    Page<ProjectResult> wsjdReportList(@Param("page") Page page,@Param("param")ProjectParam param);

    List<Map> selectDdListAll();

    List<Map> selectDzListAll();

    Page<ProjectResult> customPageListFinish(@Param("page")Page page,@Param("param")ProjectParam param);
    Page<ProjectYaomaResult> yaomaList(@Param("page") Page page, @Param("param")ProjectParam param);

    /**
     * 查询是否有推迟日期
     * @param proId
     * @return
     */
    Project getXctk(@Param("proId") Integer proId);

    /**
     * 修改现场踏勘推迟日期
     * @param proId
     * @param xctk
     */
    void editXctk(@Param("proId") Integer proId, @Param("xctk") String xctk);

    /**
     * 确认到货状态
     * @param proId
     * @return
     */
    ProjectResult getDh(@Param("proId") Integer proId);

    List<TaskStatus> listgcsToStop(@Param("param")ProjectParam param);

    /**
     * 获取妖码
     * @param proId
     * @return
     */
    String getYm(@Param("proId") Integer proId);

    List<Integer> findBusinessShopIdsList();

    List<DataResult> findBusinessShopList();

    List<Map<String, Object>> findBusinessShopInfoMapList(@Param("param")ProDataViewParam param);

    List<Project> getYaoma();

    List<ProjectResult> h5List(@Param("paramCondition")ProjectParam param);
   Page<ProjectResult> h5Lists(@Param("page") Page page,@Param("paramCondition")ProjectParam param);

    Integer gcbFinish(@Param("paramCondition")ProjectParam param);

    Integer wsjdFinish(@Param("paramCondition")ProjectParam param);

    Integer kljFinish(@Param("paramCondition")ProjectParam param);

    Integer syFinish(@Param("paramCondition")ProjectParam param);


    Integer ddFinish(@Param("paramCondition")ProjectParam param);

    String swtj(@Param("paramCondition")ProjectParam param);

    String gctj(@Param("paramCondition")ProjectParam param);

    List<ProjectResult> kfryList(@Param("paramCondition")ProjectParam param);

    Project getDm(@Param("yaoma") String yaoma);

    Page<Map> projectWjcList(@Param("page") Page pageContext, @Param("param") ProjectParam param);

    List<Map> wjcList();

    List<Map> getWsList();

    List<Project> projectCloseList();

    List<Map> getGc(@Param("list") List<BtySzgl> list);

    Integer getByYaoma(String yaoma);

    Page<Map> confirmList(@Param("page") Page pageContext, @Param("param") ProjectParam param);

    void updateDmSta(@Param("list") List<Project> list);

    List<Map> getYye(@Param("param") ProjectParam param);

    Page<Map> syShopList(@Param("page") Page pageContext, @Param("param") ProjectParam param);

    Project getPro(Integer proId);

    List<Map>qyjlList();
}
